import static CloudToolsPluginUtil.withClusterManager
import static CloudToolsPluginUtil.makeClusterSpec
import net.chrisrichardson.ec2deployer.cluster.ClusterManager

grailsHome = Ant.project.properties."environment.GRAILS_HOME"

includeTargets << new File ( "${grailsHome}/scripts/Init.groovy" ) 

target('default': "Verify AWS Credentials") {
    verify()
}

target(verify: "The implementation task") {
    depends(init)

    event("StatusUpdate", ["Starting verification"])

    def awsProperties = CloudToolsPluginUtil.makeAWSProperties()
    def verifier = new net.chrisrichardson.ec2deployer.core.AwsCredentialsVerifier(awsProperties)
    verifier.verify()

    event("StatusFinal", ["Verification complete"])

}


